<!DOCTYPE html>
<html lang='en'>

<head>
	<meta charset='utf-8' />
	<title>安装vue</title>
	<!-- <script src='https://cdn.jsdelivr.net/npm/vue/dist/vue.js'></script> -->
	<script src='../js/vue.js'></script>
</head>

<body>
	<div id='app'>

		<h1>今天天气很{{info}}</h1>
		<button @click="change">点击切换天气</button>

	</div>



	<script>
		// var vue = new Vue({
		// 	el: '#app',
		// 	data: {
		// 		wheather: '凉爽',
		// 	},
		// 	methods: {
		// 		change(value, event) {
		// 			if (value == '凉爽') {
		// 				this.wheather = "炎热"

		// 			} else {
		// 				this.wheather = "凉爽"
		// 			}

		// 		}
		// 	}
		// });
		var vue = new Vue({
			el: '#app',
			data: {
				wheather: true,
			}, methods: {
				change(event) {
					this.wheather = !this.wheather
				}
			}, computed: {
				info: {
					get() {
						return this.wheather ? '炎热' : '凉爽'
					},
					set() {
						console.log("aaa")
					}

				}

			}

		});

	</script>
</body>

</html>